/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package persistencia;

import java.io.Serializable;
import javax.persistence.*;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author hellwolf
 */
@Entity
@Table(name = "tipofactura")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Tipofactura.findAll", query = "SELECT t FROM Tipofactura t"),
    @NamedQuery(name = "Tipofactura.findById", query = "SELECT t FROM Tipofactura t WHERE t.id = :id"),
    @NamedQuery(name = "Tipofactura.findByTipoCargo", query = "SELECT t FROM Tipofactura t WHERE t.tipoCargo = :tipoCargo")})
public class Tipofactura implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Integer id;
    @Column(name = "tipoCargo")
    private String tipoCargo;

    public Tipofactura() {
    }

    public Tipofactura(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTipoCargo() {
        return tipoCargo;
    }

    public void setTipoCargo(String tipoCargo) {
        this.tipoCargo = tipoCargo;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Tipofactura)) {
            return false;
        }
        Tipofactura other = (Tipofactura) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "persistencia.Tipofactura[ id=" + id + " ]";
    }
    
}
